//该文件用于创建真个应用的路由器
import VueRouter from 'vue-router'

//创建斌暴露一个路由器
export default new VueRouter({
    routes: [
        {
            path:'/home',
            name:"homes",
            components: {
                a: () => import('@/components/article/articlejiegou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            } 
        },
        {
            path:'/',
            name:"home",
            // redirect:"/",
            components: {
                a: () => import('@/components/article/articlejiegou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            }
        },
        {
            path:"/aab/:artId",
            components:{
                a: () => import('@/components/showArticle/showArticlejiagou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            }
        },
        {
            path:'/articleTimeline',
            name:"articleTimeline",
            components: {
                a: () => import('@/components/showArticle/articleTimeline'),
                meta:{
                    keepAlive:true//不缓存 
                }
            } 
        },
        {
            path:"/tologin",
            name:"tologins",
            components:{
                loginandregister:() => import('@/components/loginAndregister/loginAndregisterjiagou'),
                a: () => import('@/components/article/articlejiegou'),
            },
            children:[
                {
                    path:"/",
                    components:{
                        lr:() => import('@/components/loginAndregister/login.vue'),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    } 
                }
            ]
        },  
        {
            path:"/toregister",
            components:{
                loginandregister:() => import('@/components/loginAndregister/loginAndregisterjiagou'),
                a: () => import('@/components/article/articlejiegou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            },
            children:[
                {
                    path:"/",
                    components:{
                        lr:() => import('@/components/loginAndregister/register.vue'),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    } 
                }
            ]

        },
        {
            path:"/login",
            name:"login",
            components:{
                loginandregister:() => import('@/components/loginAndregister/loginAndregisterjiagou'),
                a: () => import('@/components/article/articlejiegou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            },
            children:[
                {
                    path:"/",
                        components:{
                            lr:() => import('@/components/loginAndregister/login.vue'),
                            meta:{
                                keepAlive:true//不缓存 
                            }
                        }
                },
              
            ]
          
        },
        {
            path:"/register",
            components:{
                loginandregister:() => import('@/components/loginAndregister/loginAndregisterjiagou'),
                a: () => import('@/components/article/articlejiegou'),
                meta:{
                    keepAlive:true//不缓存 
                }
            },
            children:[
                {
                    path:"/",
                        components:{
                            lr:() => import('@/components/loginAndregister/register.vue'),
                            meta:{
                                keepAlive:true//不缓存 
                            }
                        }
                },
              
            ]
          
        }
        ,
        {
            path:"/personal",
            name:"Personal",
            redirect:"/info",
            components:{
                a:() => import('@/components/personalInformation/personalInformation.vue'),
                meta:{
                    keepAlive:true//不缓存 
                }
            },
            children:[
                {
                 path:"/info",
                 name:"",
                 components:{
                     personal:() => import("@/components/personalInformation/personalcenter.vue"),
                     meta:{
                        keepAlive:true//不缓存 
                    }
                 }
                },
                {
                    path:"infoCompletion",
                    components:{
                        personal:() => import("@/components/personalInformation/infoCompletion.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"changePassword",
                    components:{
                        personal:() => import("@/components/personalInformation/changePassword.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"personalSignature",
                    components:{
                        personal:() => import("@/components/personalInformation/personalSignature.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"myHead",
                    components:{
                        personal:() => import("@/components/personalInformation/myHead.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"articlemanagement",
                    name:"articlemanagement",
                    components:{
                        personal:() => import("@/components/personalInformation/articlemanagement.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"writeAnArticle",
                    components:{
                        personal:() => import("@/components/personalInformation/writeAnArticle.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    },
                       
                    
                },
                {
                    path:"commentList",
                    name:"connlist",
                    components:{
                        personal:() => import("@/components/personalInformation/commentList.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"commentEditor",
                    name:"CommentEditor",
                    components:{
                        personal:() => import("@/components/personalInformation/commentEditor.vue"),
                        meta:{
                            keepAlive:true//不缓存 
                        }
                    }
                },
                {
                    path:"updateAnArticle",
                    name:"UpdateAnArticle",
                    components:{
                        personal:() => import("@/components/personalInformation/updateAnArticleEditor.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                }
                
             ]
         
        },

        // 后台
        
        {
            path:"/admin/adminHome",
            name:"UpdateAnArticle",
            components:{
                adminHomeview:() => import("@/components/adminSystem/adminHomePage.vue"),
                meta:{
                   keepAlive:true//不缓存 
               }
            },
            children:[
                {
                    path:"/",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminArticle.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                },
                {
                    path:"adminUserList",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminUserAdministration/userAdministration.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                },
                {
                    path:"adminArticleList",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminArticleAdmininistration/articleAdmininistration.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                },
                {
                    path:"adminClassificationList",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminClassificationAdmininistration/classificationAdmininsistration.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                },
                {
                    path:"adminDocumentList",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminDocumenttypeAdmininistration/documenttypeAdmininsistration.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                },
                {
                    path:"adminCommentList",
                    components:{
                        adminView:() => import("@/components/adminSystem/adminCommentAdmininistration/commentAdmininistration.vue"),
                        meta:{
                           keepAlive:true//不缓存 
                       }
                    }
                }
            ]
        }
        
        
       

        
    ]
})